/*
 *  levelUpGame - OscDataSender.h
 *  Copyright 2011 W. Reckman. All rights reserved.
 */
#ifndef OSC_DATA_SENDER_H
#define OSC_DATA_SENDER_H

#include <string>
#include "ofxOscSender.h"
#include "GameModel.h"
#include "Utils.h"

using std::string;

class Settings;


class OscDataSender {
public:
	static const string OSC_ADDR_GAME_BALANCE;
	static const string OSC_ADDR_GAME_STATE_OLD;
	static const string OSC_ADDR_GAME_STATE_NEW;
	
	static const string OSC_ADDR_GAME_PLAYER_DATE;
	static const string OSC_ADDR_GAME_PLAYER_TIME;
	static const string OSC_ADDR_GAME_PLAYER_TARGETS;
	static const string OSC_ADDR_GAME_PLAYER_ID;
	static const string OSC_ADDR_GAME_PLAYER_IMAGES;
	static const string OSC_ADDR_GAME_PLAYER_COLOR;
	static const string OSC_ADDR_GAME_PLAYER_PICKUPS;
	
	
	OscDataSender();
	
	void setup();
	
	void sendGameBalance( float floatBalance_ ) const;
	void sendGameState( GAME_STATE oldState_, GAME_STATE newState_ ) const;
	void sendPlayerData( const GameModel::PlayerInfo& data_ ) const;
	
private:
	Settings& s;
	
	mutable ofxOscSender oscSender;
	
	string scoreboardHost;
	int scoreboardPort;
};

#endif /* ! OSC_DATA_SENDER_H */
